<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2017-2025 Steinar Bang                                                -->
<!--                                                                                 -->
<!-- Licensed under the Apache License, Version 2.0 (the "License");                 -->
<!-- you may not use this file except in compliance with the License.                -->
<!-- You may obtain a copy of the License at                                         -->
<!--   http://www.apache.org/licenses/LICENSE-2.0                                    -->
<!-- Unless required by applicable law or agreed to in writing,                      -->
<!-- software distributed under the License is distributed on an "AS IS" BASIS,      -->
<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.        -->
<!-- See the License for the specific language governing permissions and limitations -->
<!-- under the License.                                                              -->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xml:space="preserve">

    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>no.priv.bang.pom</groupId>
        <artifactId>bang-pom</artifactId>
        <version>2.1.8</version>
    </parent>
    <groupId>no.priv.bang.osgi.service.adapters</groupId>
    <artifactId>adapters-parent</artifactId>
    <version>1.3.0-SNAPSHOT</version>
    <!-- Note: remember to manually update property service-adapters.version of servlet when doing a new release, since that doesn't inherit bang-app-pom -->

    <packaging>pom</packaging>

    <name>Adapters for OSGi services</name>
    <description>Java OSGi library bundles containing classes implementing OSGi service interfaces and intended for wrapping injected OSGi services. The idea is to avoid clutter from guarding against NullPointerReference exceptions in the code using the injected services.</description>
    <url>https://github.com/steinarb/adapters-for-osgi-services</url>

    <modules>
        <module>adapters</module>
        <module>jacoco-coverage-report</module>
        <module>adapters-bom</module>
    </modules>

    <properties>
        <sonar.issue.ignore.multicriteria>e1</sonar.issue.ignore.multicriteria>
        <sonar.issue.ignore.multicriteria.e1.ruleKey>java:S1874</sonar.issue.ignore.multicriteria.e1.ruleKey>
        <sonar.issue.ignore.multicriteria.e1.resourceKey>**/adapters.logservice/**/*.java</sonar.issue.ignore.multicriteria.e1.resourceKey>
        <sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/../../jacoco-coverage-report/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.felix</groupId>
                        <artifactId>maven-bundle-plugin</artifactId>
                        <version>${maven.bundle.plugin.version}</version>
                        <type>maven-plugin</type>
                    </dependency>
                </dependencies>
                <extensions>true</extensions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <source>8</source>
                    <show>private</show>
                    <links>
                        <link>https://osgi.org/javadoc/r6/cmpn/</link>
                        <link>https://osgi.org/javadoc/r6/enterprise/</link>
                    </links>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>aggregate-javadocs</id>
                        <goals>
                            <goal>aggregate-jar</goal>
                        </goals>
                        <phase>prepare-package</phase>
                        <configuration>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.eluder.coveralls</groupId>
                <artifactId>coveralls-maven-plugin</artifactId>
                <configuration>
                    <jacocoReports>
                        <jacocoReport>${project.basedir}/jacoco-coverage-report/target/site/jacoco-aggregate/jacoco.xml</jacocoReport>
                    </jacocoReports>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <releaseProfiles>release-sign-artifact</releaseProfiles>
                    <tagNameFormat>adapters-@{project.version}</tagNameFormat>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
            </plugin>
        </plugins>
        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ftp</artifactId>
                <version>3.5.3</version>
            </extension>
        </extensions>
    </build>

    <licenses>
        <license>
            <name>Apache License - v 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Steinar Bang</name>
            <email>sb@dod.no</email>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/steinarb/adapters-for-osgi-services.git</url>
        <connection>scm:git:https://github.com/steinarb/adapters-for-osgi-services.git</connection>
        <tag>HEAD</tag>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <profiles>
        <profile>
            <id>release-sign-artifact</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.7</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
